3.4.96 \(\int \frac {\log (\frac {a+b x}{x})}{c+d x} \, dx\) [396]

Optimal. Leaf size=105 \[ \frac {\log \left (b+\frac {a}{x}\right ) \log (c+d x)}{d}+\frac {\log \left (-\frac {d x}{c}\right ) \log (c+d x)}{d}-\frac {\log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d}-\frac {\text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{d}+\frac {\text {Li}_2\left (1+\frac {d x}{c}\right )}{d} \]

[Out]

ln(b+a/x)*ln(d*x+c)/d+ln(-d*x/c)*ln(d*x+c)/d-ln(-d*(b*x+a)/(-a*d+b*c))*ln(d*x+c)/d-polylog(2,b*(d*x+c)/(-a*d+b
*c))/d+polylog(2,1+d*x/c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.12, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {2515, 2512, 266, 2463, 2441, 2352, 2440, 2438} \begin {gather*} -\frac {\text {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )}{d}+\frac {\text {PolyLog}\left (2,\frac {d x}{c}+1\right )}{d}+\frac {\log \left (\frac {a}{x}+b\right ) \log (c+d x)}{d}-\frac {\log (c+d x) \log \left (-\frac {d (a+b x)}{b c-a d}\right )}{d}+\frac {\log \left (-\frac {d x}{c}\right ) \log (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[(a + b*x)/x]/(c + d*x),x]

[Out]

(Log[b + a/x]*Log[c + d*x])/d + (Log[-((d*x)/c)]*Log[c + d*x])/d - (Log[-((d*(a + b*x))/(b*c - a*d))]*Log[c +
d*x])/d - PolyLog[2, (b*(c + d*x))/(b*c - a*d)]/d + PolyLog[2, 1 + (d*x)/c]/d

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2440

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + c*e*(x/g)])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2441

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((f + g
*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])/g), x] - Dist[b*e*(n/g), Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2463

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((h_.)*(x_))^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q
_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (h*x)^m*(f + g*x^r)^q, x], x] /; FreeQ[{a,
 b, c, d, e, f, g, h, m, n, p, q, r}, x] && IntegerQ[m] && IntegerQ[q]

Rule 2512

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[f +
g*x]*((a + b*Log[c*(d + e*x^n)^p])/g), x] - Dist[b*e*n*(p/g), Int[x^(n - 1)*(Log[f + g*x]/(d + e*x^n)), x], x]
 /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && RationalQ[n]

Rule 2515

Int[((a_.) + Log[(c_.)*(v_)^(p_.)]*(b_.))^(q_.)*(u_)^(r_.), x_Symbol] :> Int[ExpandToSum[u, x]^r*(a + b*Log[c*
ExpandToSum[v, x]^p])^q, x] /; FreeQ[{a, b, c, p, q, r}, x] && LinearQ[u, x] && BinomialQ[v, x] &&  !(LinearMa
tchQ[u, x] && BinomialMatchQ[v, x])

Rubi steps

\begin {align*} \int \frac {\log \left (\frac {a+b x}{x}\right )}{c+d x} \, dx &=\int \frac {\log \left (b+\frac {a}{x}\right )}{c+d x} \, dx\\ &=\frac {\log \left (b+\frac {a}{x}\right ) \log (c+d x)}{d}+\frac {a \int \frac {\log (c+d x)}{\left (b+\frac {a}{x}\right ) x^2} \, dx}{d}\\ &=\frac {\log \left (b+\frac {a}{x}\right ) \log (c+d x)}{d}+\frac {a \int \left (\frac {\log (c+d x)}{a x}-\frac {b \log (c+d x)}{a (a+b x)}\right ) \, dx}{d}\\ &=\frac {\log \left (b+\frac {a}{x}\right ) \log (c+d x)}{d}+\frac {\int \frac {\log (c+d x)}{x} \, dx}{d}-\frac {b \int \frac {\log (c+d x)}{a+b x} \, dx}{d}\\ &=\frac {\log \left (b+\frac {a}{x}\right ) \log (c+d x)}{d}+\frac {\log \left (-\frac {d x}{c}\right ) \log (c+d x)}{d}-\frac {\log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d}-\int \frac {\log \left (-\frac {d x}{c}\right )}{c+d x} \, dx+\int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx\\ &=\frac {\log \left (b+\frac {a}{x}\right ) \log (c+d x)}{d}+\frac {\log \left (-\frac {d x}{c}\right ) \log (c+d x)}{d}-\frac {\log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d}+\frac {\text {Li}_2\left (1+\frac {d x}{c}\right )}{d}+\frac {\text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{d}\\ &=\frac {\log \left (b+\frac {a}{x}\right ) \log (c+d x)}{d}+\frac {\log \left (-\frac {d x}{c}\right ) \log (c+d x)}{d}-\frac {\log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d}-\frac {\text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{d}+\frac {\text {Li}_2\left (1+\frac {d x}{c}\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 80, normalized size = 0.76 \begin {gather*} \frac {\left (\log \left (b+\frac {a}{x}\right )+\log \left (-\frac {d x}{c}\right )-\log \left (\frac {d (a+b x)}{-b c+a d}\right )\right ) \log (c+d x)-\text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )+\text {Li}_2\left (1+\frac {d x}{c}\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[(a + b*x)/x]/(c + d*x),x]

[Out]

((Log[b + a/x] + Log[-((d*x)/c)] - Log[(d*(a + b*x))/(-(b*c) + a*d)])*Log[c + d*x] - PolyLog[2, (b*(c + d*x))/
(b*c - a*d)] + PolyLog[2, 1 + (d*x)/c])/d

________________________________________________________________________________________

Maple [A]
time = 2.33, size = 126, normalized size = 1.20

method result size
risch \(\frac {\dilog \left (\frac {a d -c b +c \left (b +\frac {a}{x}\right )}{a d -c b}\right )}{d}+\frac {\ln \left (b +\frac {a}{x}\right ) \ln \left (\frac {a d -c b +c \left (b +\frac {a}{x}\right )}{a d -c b}\right )}{d}-\frac {\ln \left (b +\frac {a}{x}\right ) \ln \left (-\frac {a}{b x}\right )}{d}-\frac {\dilog \left (-\frac {a}{b x}\right )}{d}\) \(114\)
derivativedivides \(-a \left (-\frac {\left (\frac {\dilog \left (\frac {a d -c b +c \left (b +\frac {a}{x}\right )}{a d -c b}\right )}{c}+\frac {\ln \left (b +\frac {a}{x}\right ) \ln \left (\frac {a d -c b +c \left (b +\frac {a}{x}\right )}{a d -c b}\right )}{c}\right ) c}{d a}+\frac {\dilog \left (-\frac {a}{b x}\right )+\ln \left (b +\frac {a}{x}\right ) \ln \left (-\frac {a}{b x}\right )}{d a}\right )\) \(126\)
default \(-a \left (-\frac {\left (\frac {\dilog \left (\frac {a d -c b +c \left (b +\frac {a}{x}\right )}{a d -c b}\right )}{c}+\frac {\ln \left (b +\frac {a}{x}\right ) \ln \left (\frac {a d -c b +c \left (b +\frac {a}{x}\right )}{a d -c b}\right )}{c}\right ) c}{d a}+\frac {\dilog \left (-\frac {a}{b x}\right )+\ln \left (b +\frac {a}{x}\right ) \ln \left (-\frac {a}{b x}\right )}{d a}\right )\) \(126\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln((b*x+a)/x)/(d*x+c),x,method=_RETURNVERBOSE)

[Out]

-a*(-(dilog((a*d-c*b+c*(b+a/x))/(a*d-b*c))/c+ln(b+a/x)*ln((a*d-c*b+c*(b+a/x))/(a*d-b*c))/c)*c/d/a+(dilog(-a/b/
x)+ln(b+a/x)*ln(-a/b/x))/d/a)

________________________________________________________________________________________

Maxima [A]
time = 0.34, size = 124, normalized size = 1.18 \begin {gather*} -\frac {{\left (\log \left (b x + a\right ) - \log \left (x\right )\right )} \log \left (d x + c\right )}{d} + \frac {\log \left (d x + c\right ) \log \left (\frac {b x + a}{x}\right )}{d} - \frac {\log \left (\frac {d x}{c} + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-\frac {d x}{c}\right )}{d} + \frac {\log \left (b x + a\right ) \log \left (\frac {b d x + a d}{b c - a d} + 1\right ) + {\rm Li}_2\left (-\frac {b d x + a d}{b c - a d}\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((b*x+a)/x)/(d*x+c),x, algorithm="maxima")

[Out]

-(log(b*x + a) - log(x))*log(d*x + c)/d + log(d*x + c)*log((b*x + a)/x)/d - (log(d*x/c + 1)*log(x) + dilog(-d*
x/c))/d + (log(b*x + a)*log((b*d*x + a*d)/(b*c - a*d) + 1) + dilog(-(b*d*x + a*d)/(b*c - a*d)))/d

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((b*x+a)/x)/(d*x+c),x, algorithm="fricas")

[Out]

integral(log((b*x + a)/x)/(d*x + c), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\log {\left (\frac {a}{x} + b \right )}}{c + d x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln((b*x+a)/x)/(d*x+c),x)

[Out]

Integral(log(a/x + b)/(c + d*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((b*x+a)/x)/(d*x+c),x, algorithm="giac")

[Out]

integrate(log((b*x + a)/x)/(d*x + c), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\ln \left (\frac {a+b\,x}{x}\right )}{c+d\,x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log((a + b*x)/x)/(c + d*x),x)

[Out]

int(log((a + b*x)/x)/(c + d*x), x)

________________________________________________________________________________________